<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->nullable();
            $table->string('thumb')->nullable();
            $table->integer('category_id')->nullable()->comment('产品分类');
            $table->string('attribute_ids')->nullable()->comment('产品属性');
            $table->string('price')->nullable()->comment('卖价');
            $table->string('price1')->nullable()->comment('一级代理价格');
            $table->string('price2')->nullable()->comment('二级代理价格');
            $table->string('price3')->nullable()->comment('三级代理价格');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
}
